package com.jieshuibao.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.jieshuibao.mapper.H5SpreadSignMapper;
import com.jieshuibao.model.db.H5SpreadSign;
import com.jieshuibao.model.db.H5SpreadSignExample;

@Service
public class H5SpreadSignService{
	
	@Resource
	private H5SpreadSignMapper h5SpreadSignMapper;
	
	public void addH5SpreadSign(H5SpreadSign h5SpreadSign) {
		h5SpreadSignMapper.insertSelective(h5SpreadSign);
	}
	
	public void delH5SpreadSignByPhone(String phone) {
		h5SpreadSignMapper.deleteByPrimaryKey(phone);
	}
	
	public void updateH5SpreadSign(H5SpreadSign h5SpreadSign) {
		h5SpreadSignMapper.updateByPrimaryKeySelective(h5SpreadSign);
	}
	
	public void updateH5SpreadSignByExample(H5SpreadSign h5SpreadSign,H5SpreadSignExample h5SpreadSignExample){
	    h5SpreadSignMapper.updateByExampleSelective(h5SpreadSign,h5SpreadSignExample);
	}
	
	public H5SpreadSign getH5SpreadSignByPhone(String phone) {
		return h5SpreadSignMapper.selectByPrimaryKey(phone);
	}
	
	public List<H5SpreadSign> getPageH5SpreadSign(H5SpreadSignExample h5SpreadSignExample) {
		return h5SpreadSignMapper.selectPage(h5SpreadSignExample);
	}
	
	public int countH5SpreadSign(H5SpreadSignExample h5SpreadSignExample) {
		return h5SpreadSignMapper.countByExample(h5SpreadSignExample);
	}
	
	public List<H5SpreadSign> selectByExample(H5SpreadSignExample example){
	    return h5SpreadSignMapper.selectByExample(example);
	}
}
